package br.mil.eb.pqrmnt7.scc.entity.controleabastecimento;


import javax.persistence.Access;
import javax.persistence.AccessType;
import javax.persistence.Entity;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

import com.powerlogic.jcompany.commons.config.stereotypes.SPlcEntity;
/**
 * Classe Concreta gerada a partir do assistente
 */
@SPlcEntity
@Entity
@Table(name="LINHA_CONTROLE_SALDO_COMBUSTIVEL")
@SequenceGenerator(name="SE_LINHA_CONTROLE_SALDO_COMBUSTIVEL", sequenceName="SE_LINHA_CONTROLE_SALDO_COMBUSTIVEL")
@Access(AccessType.FIELD)

@NamedQueries({
	@NamedQuery(name="LinhaControleSaldoCombustivelEntity.queryMan", query="from LinhaControleSaldoCombustivelEntity"),
	@NamedQuery(name="LinhaControleSaldoCombustivelEntity.querySel", query="select id as id, data as data, Entrada as Entrada, Saida as Saida, saldo as saldo, viatura as viatura, motorista as motorista, numeroVale as numeroVale, fonte as fonte from LinhaControleSaldoCombustivelEntity order by viatura asc"),
	@NamedQuery(name="LinhaControleSaldoCombustivelEntity.querySelLookup", query="select id as id, viatura as viatura from LinhaControleSaldoCombustivelEntity where id = ? order by id asc")
})
public class LinhaControleSaldoCombustivelEntity extends LinhaControleSaldoCombustivel {
	
	private static final long serialVersionUID = 1L;
 	
    /*
     * Construtor padrao
     */
    public LinhaControleSaldoCombustivelEntity() {
    }
    
	public LinhaControleSaldoCombustivelEntity(	FluxoCombustivel fluxoCombustivel) {
		setFluxoCombustivel(fluxoCombustivel);
	}

	@Override
	public String toString() {
		return getViatura();
	}

	@Override
	public int compareTo(LinhaControleSaldoCombustivel o) {
		return this.getData().compareTo(o.getData());
	}

}
